This invention relates to distributed client-server systems and methods for upgrading client software from an upgrade server.
In traditional client-server systems, the server upgrades software on the client by transferring a new version of the program. The client is equipped with adequate memory resources to store both the old and new versions of the program. When the new version is present, the client informs the user that an upgrade is available and gives the user an opportunity to upgrade to the new version. If the user agrees, the old version is renamed out of the way and the new version is renamed to the default name used by the client when booting up or calling the program.
With the advent of alternative client products having limited processing capabilities and memory, this traditional model of upgrading software on the client cannot be used because the client is unable to store the entire new version of software. These scaled down or xe2x80x9cthinxe2x80x9d clients are typically constructed with just enough functionality to enable access to the server computer over a network. The thin client is typically able to store one version of the software, plus a little more. Examples of thin clients include low cost computers known as xe2x80x9cnetwork computersxe2x80x9d or xe2x80x9cNCsxe2x80x9d and television set-top boxes (STBs).
This invention concerns a method for upgrading software on thin clients, although the method can be applied in other server-client contexts that employ general-purpose computing clients.
This invention concerns a system for upgrading software in a client-server architecture. The system has multiple clients coupled to an upgrade server. The clients have limited processing and storage capabilities. Examples of such clients include network computers, set-top boxes, portable information devices, and so forth. The clients store an old version of software, such as in a flash memory.
The upgrade server has a processor and a memory. The upgrade server stores both the old version of software and a new version of software. The upgrade server runs an upgrade program that creates an upgrade file from the old and new versions of software such that the upgrade file is much smaller than the new version. In the compressed upgrade file, the upgrade server distinguishes between matching sections that match in both the old and new versions from non-matching sections that are present only in the new version with no counterpart in the old version.
The upgrade server identifies the matching sections by comparing an old character string (or any arbitrary string of bytes) from the old version with a new character string (or any arbitrary string of bytes) from the new version. The upgrade server finds common substrings in the two character strings. In one implementation, the upgrade server derives a two-dimensional table containing multiple entries, whereby each entry represents a length of a longest common substring beginning at a first position in the old character string and at a second position in the new character string. The upgrade server then ascertains the longest common substring from the table.
For matching sections, the upgrade server creates pointer headers that identify the sections in the old version that match sections in the new version. The upgrade server inserts the pointer headers into the upgrade file in lieu of the matching sections. For non-matching sections, the upgrade server creates data headers and inserts them and their corresponding non-matching sections from the new version into the upgrade file. The data headers indicate that the accompanying sections contain new data.
The upgrade server transfers the upgrade file, which is a compressed form of the new version of software. The client receives the upgrade file and begins processing the file to reconstruct the new version of software from the upgrade file and the old version stored locally. Upon reaching a data header, the client adds the new section from the new version. Upon reaching a pointer header, the client copies the common substring from the old version into the recreated new version. After the entire upgrade file is processed, the client possesses the new version of the software. The client can then inform the user, and upon reboot, begin operation using the new software version.